import { http } from '@/utils/http'
import type { CareOrder, CheckOrderDetail } from '@/types/docter/careOrder'

/**
 * 通过患者ID查询检查列表
 * @param patientId
 */
export const getCareOrderListByPatientIdAPI = (patientId: string) => {
  return http<CareOrder[]>({
    method: 'POST',
    url: `/doctor/careOrder/selectByPatientId/${patientId}`,
  });
};


// 查询检查列表
/**
 * 查询检查列表
 */
export const getCareOrderListByCoTypeAPI = () => {
  return http<CareOrder[]>({
    method: 'GET',
    url: '/docter/api/care/getCareOrderListByCoType',
  })
}


/**
 * 通过开诊明细的id查询明细信息
 * @param itemId
 */
export const getCheckOrderDetailsByItemIdAPI = (itemId?: string) => {
  return http<CheckOrderDetail>({
    method: 'GET',
    url: `/doctor/CheckResult/selectByItemId/${itemId}`,
  })
}
